﻿using MediatR;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using SheepStorage.API.Application.Command.PendingPromptCommand;
using SheepStorage.API.Baseclass;
using SheepStorage.Domain.Entity;
using SheepStorage.Service.Interface;

namespace SheepStorage.API.Controllers
{
    /// <summary>
    /// 提示报表
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class PendingPromptController : ControllerBase
    {
        private readonly IMediator _mediator;

        public PendingPromptController(IMediator mediator)
        {
            _mediator = mediator;
        }
        /// <summary>
        /// 提示报表根据（提示类型显示）
        /// </summary>
        /// <param name="request">提示类型(1-代配,2-首次妊检,3-分娩)</param>
        /// <returns></returns>
        [HttpPost]
        public async Task<Results<List<PromptModel>>> Handle(PendingPromptShowCommand request)
        {
            return await _mediator.Send(request);
        }

    }
}
